import service from "@/api/index.js";

const collectApi = {
//     收藏
    add(goodsId) {
        return service.post(`/collect/${goodsId}`)
    },
//     取消收藏
    del(goodsId) {
        return service.delete(`/collect/${goodsId}`)
    },
//     根据商品id查询
    getInfo(goodsId) {
        return service.get(`/collect/${goodsId}`)
    },
//     获得收藏列表
    getList() {
        return service.get('/collect')
    }
}

export default collectApi